﻿using RestSharp;

namespace DongFangGuoKai.TaskPlatform.Commn.ApiModule
{
    public interface IApiClient
    {
        T Get<T>(string resource) where T : new();
        T Get<T>(string resource, Parameter[] parameter) where T : new();
        T Get<T>(string resource, Parameter[] parameter, Dictionary<string, string> headers = null) where T : new();
        T Post<T>(string resource) where T : new();
        T Post<T>(string resource, object data) where T : new();
        T Post<T>(string resource, object data, Dictionary<string, string> headers = null) where T : new();
        T Put<T>(string resource) where T : new();
        T Put<T>(string resource, Parameter[] parameter) where T : new();
        T Put<T>(string resource, Parameter[] parameter, Dictionary<string, string> headers = null) where T : new();

        string GetAuthToken();
    }
}